@import '../../../../../styles/var.less';

.box {
  padding: 0px 0px 20px 0px;
}

.treeNode {
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 26px;
  border-radius: 4px;
  opacity: 1;
  cursor: pointer;
  transition: opacity 0.05s ease-in, height 0.1s ease-in;
  user-select: none;

  &:hover {
    background-color: var(--color-hover-bg);
    .right {
      background-color: var(--custom-primary);
      color: var(--color-primary);
    }
    .arrows {
      display: flex;
    }
  }
}

.left {
  display: flex;
  align-items: center;
  height: 100%;
  flex-shrink: 0;
}

.right {
  flex: 1;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0px 10px;
  border-radius: 2px;
  // color: var(--color-text-secondary);
  .moreButton {
    flex-shrink: 0;
    display: none;
    transform: rotate(90deg);
  }

  &:hover {
    background-color: var(--color-hover-bg);
    .moreButton {
      display: block;
    }
  }
}

.arrows {
  flex-shrink: 0;
  width: 20px;
  height: 26px;
  display: flex;
  align-items: center;
  transform: rotate(0deg);
  transition: transform 0.2s ease-in;
  display: none;
}

.arrowsIcon {
  display: inline-block;
  transform: rotate(-90deg);
  font-size: 12px;
}

.rotateArrowsIcon {
  transform: rotate(0deg);
}

.dblclickArea {
  display: flex;
  flex: 1;
  height: 26px;
}

.typeIcon {
  height: 26px;
  display: flex;
  align-items: center;
  width: 20px;
}

.typeImg {
  height: 20px;
  width: 20px;
  background-repeat: no-repeat;
  background-size: 20px 20px;
}

.contentText {
  width: 0;
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.name {
  .f-lines(1);
}

.type {
  font-size: 12px;
  flex-shrink: 0;
  text-align: right;
  color: var(--color-primary-text);
  opacity: 0.8;
}

.describe{
  flex: 1;
  font-size: 10px;
  margin-left: 20px;
  color: var(--color-text-tertiary);
  .f-single-line();
}

.indent {
  width: 20px;
  height: 100%;
  position: relative;
  &::before {
    position: absolute;
    top: 0;
    right: 2px;
    bottom: -4px;
    border-right: 1px solid var(--color-border);
    content: '';
  }
}

.hiddenTreeNode {
  height: 0;
  opacity: 0;
  transition: opacity 0.2s ease-in, height 0.1s ease-in;

  .arrows {
    transform: rotate(0deg);
    transition: transform 0.2s ease-in;
  }
}

.loadingIcon {
  display: inline-block;
  animation: loading-animation 1s infinite linear;
}
